// File generated from our OpenAPI spec by Stainless.

package com.metest.api.services.blocking

import com.google.errorprone.annotations.MustBeClosed
import com.metest.api.core.ClientOptions
import com.metest.api.core.RequestOptions
import com.metest.api.core.http.HttpResponseFor
import com.metest.api.models.store.StoreGetInventoryParams
import com.metest.api.models.store.StoreGetInventoryResponse
import com.metest.api.services.blocking.store.OrderService
import java.util.function.Consumer

interface StoreService {

    /**
     * Returns a view of this service that provides access to raw HTTP responses for each method.
     */
    fun withRawResponse(): WithRawResponse

    /**
     * Returns a view of this service with the given option modifications applied.
     *
     * The original service is not modified.
     */
    fun withOptions(modifier: Consumer<ClientOptions.Builder>): StoreService

    fun order(): OrderService

    /** Returns a map of status codes to quantities */
    fun getInventory(): StoreGetInventoryResponse = getInventory(StoreGetInventoryParams.none())

    /** @see getInventory */
    fun getInventory(
        params: StoreGetInventoryParams = StoreGetInventoryParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): StoreGetInventoryResponse

    /** @see getInventory */
    fun getInventory(
        params: StoreGetInventoryParams = StoreGetInventoryParams.none()
    ): StoreGetInventoryResponse = getInventory(params, RequestOptions.none())

    /** @see getInventory */
    fun getInventory(requestOptions: RequestOptions): StoreGetInventoryResponse =
        getInventory(StoreGetInventoryParams.none(), requestOptions)

    /** A view of [StoreService] that provides access to raw HTTP responses for each method. */
    interface WithRawResponse {

        /**
         * Returns a view of this service with the given option modifications applied.
         *
         * The original service is not modified.
         */
        fun withOptions(modifier: Consumer<ClientOptions.Builder>): StoreService.WithRawResponse

        fun order(): OrderService.WithRawResponse

        /**
         * Returns a raw HTTP response for `get /store/inventory`, but is otherwise the same as
         * [StoreService.getInventory].
         */
        @MustBeClosed
        fun getInventory(): HttpResponseFor<StoreGetInventoryResponse> =
            getInventory(StoreGetInventoryParams.none())

        /** @see getInventory */
        @MustBeClosed
        fun getInventory(
            params: StoreGetInventoryParams = StoreGetInventoryParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<StoreGetInventoryResponse>

        /** @see getInventory */
        @MustBeClosed
        fun getInventory(
            params: StoreGetInventoryParams = StoreGetInventoryParams.none()
        ): HttpResponseFor<StoreGetInventoryResponse> = getInventory(params, RequestOptions.none())

        /** @see getInventory */
        @MustBeClosed
        fun getInventory(
            requestOptions: RequestOptions
        ): HttpResponseFor<StoreGetInventoryResponse> =
            getInventory(StoreGetInventoryParams.none(), requestOptions)
    }
}
